<?php
/**
 * 商品保存参数
 *
 * @author: WangBin
 * @date: 2021/7/26
 * @mail: <849850352@qq.com>
 */
namespace App\Params\Backend;

use App\Common\Constant;
use App\Params\Param;

class GoodsUpdateParam extends Param
{
    public $goods_id = 0;
    public $store_id = 0;
    public $name;
    public $goods_bn = '';
    public $brand_id = 0;
    public $goods_type = Constant::GOODS_TYPE_MULTIPLE;
    public $platform = Constant::GOODS_PLATFORM_LIST;
    public $category_id;
    public $category_ids = '';
    public $market_price;
    public $sales_price;
    public $unit;
    public $tag_ids = [];
    public $video_url = '';
    public $image_url;
    public $gallery = [];
    public $intro = '';
    public $is_virtual = 0;
    public $is_show_front = 1;
    public $is_presale = 0;
    public $is_gift = 0;
    public $on_sale = 1;
    public $is_new = 0;
    public $is_hot = 0;
    public $keywords = [];
    public $remark = '';
    public $pc_detail;
    public $stock_manage = 1;
    public $spec_key_list_str;
    public $spec_list_str;

    public function rules()
    {
        return [
            'goods_id' => 'nullable|integer',
            'store_id' => 'nullable|integer',
            'name' => 'required|string',
            'goods_bn' => 'nullable|string',
            'brand_id' => 'nullable|integer',
            'platform' => 'required|array',
            'category_id' => 'required|array',
            'category_ids' => 'nullable|string',
            'market_price' => 'required|numeric|min:0',
            'sales_price' => 'required|numeric|min:0',
            'unit' => 'required|string',
            'tag_ids' => 'nullable|array',
            'video_url' => 'nullable|string',
            'image_url' => 'required|string',
            'gallery' => 'nullable|array',
            'intro' => 'nullable|string',
            'is_virtual' => 'nullable|in:0,1',
            'is_show_front' => 'nullable|in:0,1',
            'is_presale' => 'nullable|in:0,1',
            'is_gift' => 'nullable|in:0,1',
            'on_sale' => 'nullable|in:0,1',
            'is_new' => 'nullable|in:0,1',
            'is_hot' => 'nullable|in:0,1',
            'keywords' => 'nullable|array',
            'remark' => 'nullable|string',
            'pc_detail' => 'required|string',
            'stock_manage' => 'nullable|in:0,1',
            'spec_key_list_str' => 'required|array',
            'spec_list_str' => 'required|array'
        ];
    }

    /**
     * @return mixed
     */
    public function getImageListArr()
    {
        return $this->image_list_arr;
    }

    /**
     * @param mixed $image_list_arr
     */
    public function setImageListArr($image_list_arr): void
    {
        $this->image_list_arr = $image_list_arr;
    }

    /**
     * @return mixed
     */
    public function getSpecKeyListStr()
    {
        return $this->spec_key_list_str;
    }

    /**
     * @param mixed $spec_key_list_str
     */
    public function setSpecKeyListStr($spec_key_list_str): void
    {
        $this->spec_key_list_str = $spec_key_list_str;
    }

    /**
     * @return mixed
     */
    public function getSpecListStr()
    {
        return $this->spec_list_str;
    }

    /**
     * @param mixed $spec_list_str
     */
    public function setSpecListStr($spec_list_str): void
    {
        $this->spec_list_str = $spec_list_str;
    }

    /**
     * @return string
     */
    public function getCategoryIds(): string
    {
        return $this->category_ids;
    }

    /**
     * @param string $category_ids
     */
    public function setCategoryIds(string $category_ids): void
    {
        $this->category_ids = $category_ids;
    }

    /**
     * @return int
     */
    public function getGoodsId(): int
    {
        return $this->goods_id;
    }

    /**
     * @param int $goods_id
     */
    public function setGoodsId(int $goods_id): void
    {
        $this->goods_id = $goods_id;
    }

    /**
     * @return int
     */
    public function getStoreId(): int
    {
        return $this->store_id;
    }

    /**
     * @param int $store_id
     */
    public function setStoreId(int $store_id): void
    {
        $this->store_id = $store_id;
    }

    /**
     * @return mixed
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * @param mixed $name
     */
    public function setName($name): void
    {
        $this->name = $name;
    }

    /**
     * @return mixed
     */
    public function getGoodsBn()
    {
        return $this->goods_bn;
    }

    /**
     * @param mixed $goods_bn
     */
    public function setGoodsBn($goods_bn): void
    {
        $this->goods_bn = $goods_bn;
    }

    /**
     * @return int
     */
    public function getBrandId(): int
    {
        return $this->brand_id;
    }

    /**
     * @param int $brand_id
     */
    public function setBrandId(int $brand_id): void
    {
        $this->brand_id = $brand_id;
    }

    /**
     * @return string
     */
    public function getGoodsType(): string
    {
        return $this->goods_type;
    }

    /**
     * @param string $goods_type
     */
    public function setGoodsType(string $goods_type): void
    {
        $this->goods_type = $goods_type;
    }

    /**
     * @return array
     */
    public function getPlatform(): array
    {
        return $this->platform;
    }

    /**
     * @param array $platform
     */
    public function setPlatform(array $platform): void
    {
        $this->platform = $platform;
    }

    /**
     * @return mixed
     */
    public function getCategoryId()
    {
        return $this->category_id;
    }

    /**
     * @param mixed $category_id
     */
    public function setCategoryId($category_id): void
    {
        $this->category_id = $category_id;
    }

    /**
     * @return mixed
     */
    public function getMarketPrice()
    {
        return $this->market_price;
    }

    /**
     * @param mixed $market_price
     */
    public function setMarketPrice($market_price): void
    {
        $this->market_price = $market_price;
    }

    /**
     * @return mixed
     */
    public function getSalesPrice()
    {
        return $this->sales_price;
    }

    /**
     * @param mixed $sales_price
     */
    public function setSalesPrice($sales_price): void
    {
        $this->sales_price = $sales_price;
    }

    /**
     * @return mixed
     */
    public function getUnit()
    {
        return $this->unit;
    }

    /**
     * @param mixed $unit
     */
    public function setUnit($unit): void
    {
        $this->unit = $unit;
    }

    /**
     * @return array
     */
    public function getTagIds(): array
    {
        return $this->tag_ids;
    }

    /**
     * @param array $tag_ids
     */
    public function setTagIds(array $tag_ids): void
    {
        $this->tag_ids = $tag_ids;
    }

    /**
     * @return string
     */
    public function getVideoUrl(): string
    {
        return $this->video_url;
    }

    /**
     * @param string $video_url
     */
    public function setVideoUrl(string $video_url): void
    {
        $this->video_url = $video_url;
    }

    /**
     * @return mixed
     */
    public function getImageUrl()
    {
        return $this->image_url;
    }

    /**
     * @param mixed $image_url
     */
    public function setImageUrl($image_url): void
    {
        $this->image_url = $image_url;
    }

    /**
     * @return mixed
     */
    public function getGallery()
    {
        return $this->gallery;
    }

    /**
     * @param mixed $gallery
     */
    public function setGallery($gallery): void
    {
        $this->gallery = $gallery;
    }

    /**
     * @return string
     */
    public function getIntro(): string
    {
        return $this->intro;
    }

    /**
     * @param string $intro
     */
    public function setIntro(string $intro): void
    {
        $this->intro = $intro;
    }

    /**
     * @return int
     */
    public function getIsVirtual(): int
    {
        return $this->is_virtual;
    }

    /**
     * @param int $is_virtual
     */
    public function setIsVirtual(int $is_virtual): void
    {
        $this->is_virtual = $is_virtual;
    }

    /**
     * @return int
     */
    public function getIsShowFront(): int
    {
        return $this->is_show_front;
    }

    /**
     * @param int $is_show_front
     */
    public function setIsShowFront(int $is_show_front): void
    {
        $this->is_show_front = $is_show_front;
    }

    /**
     * @return int
     */
    public function getIsPresale(): int
    {
        return $this->is_presale;
    }

    /**
     * @param int $is_presale
     */
    public function setIsPresale(int $is_presale): void
    {
        $this->is_presale = $is_presale;
    }

    /**
     * @return int
     */
    public function getIsGift(): int
    {
        return $this->is_gift;
    }

    /**
     * @param int $is_gift
     */
    public function setIsGift(int $is_gift): void
    {
        $this->is_gift = $is_gift;
    }

    /**
     * @return int
     */
    public function getOnSale(): int
    {
        return $this->on_sale;
    }

    /**
     * @param int $on_sale
     */
    public function setOnSale(int $on_sale): void
    {
        $this->on_sale = $on_sale;
    }

    /**
     * @return int
     */
    public function getIsNew(): int
    {
        return $this->is_new;
    }

    /**
     * @param int $is_new
     */
    public function setIsNew(int $is_new): void
    {
        $this->is_new = $is_new;
    }

    /**
     * @return int
     */
    public function getIsHot(): int
    {
        return $this->is_hot;
    }

    /**
     * @param int $is_hot
     */
    public function setIsHot(int $is_hot): void
    {
        $this->is_hot = $is_hot;
    }

    /**
     * @return array
     */
    public function getKeywords(): array
    {
        return $this->keywords;
    }

    /**
     * @param array $keywords
     */
    public function setKeywords(array $keywords): void
    {
        $this->keywords = $keywords;
    }

    /**
     * @return string
     */
    public function getRemark(): string
    {
        return $this->remark;
    }

    /**
     * @param string $remark
     */
    public function setRemark(string $remark): void
    {
        $this->remark = $remark;
    }

    /**
     * @return mixed
     */
    public function getPcDetail()
    {
        return $this->pc_detail;
    }

    /**
     * @param mixed $pc_detail
     */
    public function setPcDetail($pc_detail): void
    {
        $this->pc_detail = $pc_detail;
    }

    /**
     * @return int
     */
    public function getStockManage(): int
    {
        return $this->stock_manage;
    }

    /**
     * @param int $stock_manage
     */
    public function setStockManage(int $stock_manage): void
    {
        $this->stock_manage = $stock_manage;
    }
}
